# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-m2crypto
_pyname=M2Crypto
pkgver=0.36.0
pkgrel=0
pkgdesc="A crypto and SSL toolkit for Python3"
options="!check" # test_public_encrypt and test_server_simple_timeouts fail
url="https://pypi.python.org/pypi/M2Crypto/"
arch="all"
license="MIT"
depends="python3"
makedepends="python3-dev py3-setuptools openssl-dev swig"
source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

replaces="py-m2crypto" # Backwards compatibility
provides="py-m2crypto=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="5b7d6d10c943ff0e09e0e9748d5578e7e0f7659a73de4ba49481152bca05871aef2bfbb869e1636a7cebcf2dd8b9f67fb0d299a833d1d4ebd538031c35d7bca1  M2Crypto-0.36.0.tar.gz"
